package com.wps.wdztv6.api.request;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;

@Data
@Builder
public class DocumentSplitRequest {
    // 任务id
    @JSONField(name = "task_id")
    private String taskId;

    // 文档地址
    @JSONField(name = "doc_url")
    private String docUrl;

    // 文档名称，必须带后缀
    @JSONField(name = "doc_filename")
    private String docFilename;

    // 拆分类型
    private String type;

    private Average average;

    @JSONField(name = "ranges")
    private ArrayList<Range> ranges;

    @Getter
    @Setter
    @Builder
    public static class Average{
        private Integer size;

        @JSONField(name = "split_range")
        private SplitRange splitRange;

        @Getter
        @Setter
        @Builder
        public static class SplitRange{
            private Integer start;
            private Integer end;
        }
    }

    @Getter
    @Setter
    @Builder
    public static class Range{
        private Integer start;
        private Integer end;
    }
}
